// TPCHRVVAggregator.java
package com.abcd1234;

public class TPCHRVVAggregator {
    static {
        System.loadLibrary("tpchrvvagg"); // 加载 libtpchrvvagg.so
    }

    // Native 方法声明
    public native long createAggState();
    public native void updateBatch(long statePtr, 
                                   double[] quantities, double[] prices, 
                                   double[] discounts, double[] taxes, 
                                   int count);
    public native void merge(long statePtr1, long statePtr2);
    public native Double[] getResult(long statePtr);
    public native void freeState(long statePtr);
}
